.container {
  background-color: #fff;
  display: flex;
  height: 100vh;
  flex-direction: column;
}

.header {
  z-index: 10;

  .search-box {
    height: 100rpx;
    padding: 20rpx 40rpx;
    display: flex;
    align-items: center;
    justify-content: center;

    .search-input {
      height: 60rpx;
      width: 100%;
      background-color: #f7f7f7;
      font-size: 26rpx;
      border-radius: 50rem !important;
      display: flex;
      justify-content: center;
      align-items: center;

      .search-icon {
        width: 30rpx;
        height: 30rpx;
        margin-right: 10rpx;
      }
    }
  }

  .center {
    height: 130rpx;
    padding: 10rpx 40rpx;
    display: flex;
    flex-direction: column;

    .store {
      display: flex;
      align-items: center;
      justify-content: space-between;

      .title {
        flex: 1;
        display: flex;
        align-items: center;
        font-size: 30rpx;
        color: #343434;
        font-weight: bold;
        overflow: hidden;

        .address {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .left-icon {
          flex-shrink: 0;
          width: 30rpx;
          height: 30rpx;
          margin: 10rpx;
        }

        .right-icon {
          flex-shrink: 0;
          width: 40rpx;
          height: 40rpx;
        }
      }

      .buttons {
        display: flex;
        align-items: stretch;
        background-color: #f6f6f6;
        border-radius: 50rem !important;
        padding: 4rpx;
        border: 2rpx solid #eaeaea;

        .button {
          height: 100%;
          width: 50%;
          border-radius: 50rem !important;
          border: 0 !important;
          font-size: 24rpx !important;
          line-height: 2.4 !important;

          &.active {
            background-color: #343434;
            color: #ffffff !important;
            transition: all 0.3s;
          }
        }
      }
    }

    .location {
      font-size: 26rpx;
      color: #777;
    }
  }

  .notices {
    height: 60rpx;
    display: flex;
    align-items: stretch;
    padding: 10rpx 40rpx;
    font-size: 24rpx;
    color: #777;
    box-shadow: 0 20rpx 20rpx -20rpx rgba($color: #333, $alpha: 0.1);

    .swiper {
      height: 100%;
      flex: 1;

      .swiper-item {
        width: 100%;
        height: 100%;
        display: flex;
        overflow: hidden;
        align-items: center;

        .image {
          width: 30rpx;
          height: 30rpx;
          flex-shrink: 0;
          margin-right: 10rpx;
        }

        .content {
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }

    .more {
      padding-left: 20rpx;
      display: flex;
      align-items: center;

      .down-icon {
        margin-left: 10rpx;
        width: 40rpx;
        height: 40rpx;
      }
    }
  }
}

.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

// 左侧菜单
.menu-bar {
  width: 170rpx;
  height: 100vh;
  // background-color: #f6f6f6;
  background-color: #efeff4;

  .wrapper {
    height: auto;
    padding-bottom: 130rpx;

    .menu-item {
      padding: 30rpx 20rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 24rpx;
      color: #333;
      overflow: hidden;

      &:nth-last-child(1) {
        margin-bottom: 100rpx;
      }

      .image {
        width: 50rpx;
        height: 50rpx;
      }

      .title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      &.active {
        background-color: #ffffff;
        color: #000;
        font-weight: 600 !important;
        border-left: 8rpx solid #e4304d;
      }
    }
  }
}

.product-section {
  flex: 1;
  height: calc(100vh-46px);
  .wrapper {
    padding: 0 20rpx;
    padding-bottom: 130rpx;
  }

  .ads1,
  .ads2 {
    height: 300rpx;
  }
  .ads1 {
    margin-bottom: 20rpx;
  }

  .category-name {
    padding: 30rpx 0;
    font-size: 26rpx;
    color: #777;
  }

  .products {
    display: flex;
    flex-direction: column;
    margin-bottom: 20rpx;
  }

  .product {
    display: flex;
    align-items: center;
    margin-bottom: 40rpx;
    position: relative;
    .mask {
      width: 540rpx;
      height: 170rpx;
      background: rgba(17, 17, 17, 0.8);
      position: absolute;
      top: 0;
      left: 0;
      z-index: 9;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    .image {
      width: 170rpx;
      height: 170rpx;
      margin-right: 10rpx;
      flex-shrink: 0;
    }

    .content {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 170rpx;

      .name {
        font-size: 34rpx;
        font-weight: 600;
        width: 360rpx;
        word-break: break-all;
        text-overflow: ellipsis;
        display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
        -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
        -webkit-line-clamp: 2; /** 显示的行数 **/
        overflow: hidden; /** 隐藏超出的内容 **/
      }

      .labels {
        display: flex;
        font-size: 20rpx;
        margin-bottom: 8rpx;
        overflow: hidden;
        flex-wrap: wrap;
        .label {
          max-width: 40%;
          padding: 6rpx 10rpx;
          margin-right: 10rpx;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }

      .description {
        margin-bottom: 20rpx;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        color: #777;
        font-size: 24rpx;
      }

      .price {
        font-size: 34rpx;
        color: #ec3e40;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .symbol {
          font-size: 20rpx;
        }
      }
    }
  }
}

.cart-actions {
  display: flex;
  align-items: center;

  .add-btn,
  .minus-btn {
    width: 50rpx;
    height: 50rpx;
  }

  .number {
    width: 50rpx;
    height: 50rpx;
    margin: 0 20rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32rpx;
  }
}
